<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <title>宽带套餐列表</title>
  <link rel="stylesheet" href="../../template/assets/css/amazeui.min.css"/>
  <link rel="stylesheet" href="../../template/website/css/app.css"/>
</head>
<body>
  <ui class="am-list am-list-static am-list-border" id="broadband-list">
    <script type="text/x-handlebars-template" id="amz-tpl">
      {{#if list}}
          {{#list}}
            <li>
              <input name="id" type="hidden" value="{{id}}" />
              <input name="business_code" type="hidden" value="{{business_code}}" />
              <input name="broad_type" type="hidden" value="{{broad_type}}" />
              <span class="am-badge am-badge-primary am-radius am-padding-sm" style="margin-top: 1.3rem">详情</span>
              <div style="width:80%;">
                <div name="name">{{name}}</div>
                <div class="am-text-truncate am-text-xs">{{business_summary}}</div>
                <div class="am-text-xs am-text-danger">资费：￥{{price}}元/{{period}}</div>
              </div>
            </li>
          {{/list}}
      {{else}}
        <li>{{error}}</li>
      {{/if}}
    </script>
  </ui>
  <div id="no-data-msg" class="am-text-center am-padding-xs am-hide">已经没有您能开户的宽带套餐了...</div>  
  <div class="am-g am-topbar am-topbar-fixed-bottom">
    <div class="am-u-sm-8 am-text-xs am-margin-top-xs am-padding-top-sm">
      已选择
      <span class="am-text-primary" id="broadband-name"></span>
      <input id="broadband-id" type="hidden" />
      <input id="broadband-business-code" type="hidden" />
    </div>
    <div class="am-u-sm-4 am-btn-primary am-text-center" id="broadband-reservation-btn" style="padding: 1.2rem 0">立即开户</div>
  </div>
  <div class="am-modal am-modal-loading am-modal-no-btn" tabindex="-1" id="modal">
    <div class="am-modal-dialog">
      <div class="am-modal-hd">加载中...</div>
      <div class="am-modal-bd">
        <span class="am-icon-spinner am-icon-spin"></span>
      </div>
    </div>
  </div>
  <div class="am-modal am-modal-alert" tabindex="-1" id="alert">
    <div class="am-modal-dialog">
      <div class="am-modal-hd">提示</div>
      <div class="am-modal-bd" id="alert-content"></div>
      <div class="am-modal-footer">
        <span class="am-modal-btn">确定</span>
      </div>
    </div>
  </div>
  <script type="text/javascript" src="../../template/assets/js/jquery.min.js"></script>
  <script type="text/javascript" src="../../template/assets/js/amazeui.min.js"></script>
  <script type="text/javascript" src="../../template/assets/js/handlebars.min.js"></script>
  <script type="text/javascript" src="../../template/assets/js/amazeui.widgets.helper.min.js"></script>
  <script type="text/javascript" src="../../template/website/js/app.js"></script>
  <script type="text/javascript" src="../../template/website/js/bd.openacct.common.js"></script>
  <script type="text/javascript" src="../../template/website/js/campus/bd.openacct.list.js?v=4"></script>
  <script type="text/javascript">
    //返回页面分享的参数,当当前页面有canAppShare=1参数时需要添加此函数resShareParm(函数名不能改，客户端已经只调用这个函数)
    function resShareParm() {
        var regText1 = "saleType=1";
        var regText2 = "saleType=3";
        var regS1 = new RegExp(regText1, "gi");
        var regS2 = new RegExp(regText2, "gi");
        var urlpath = window.location.href.replace(regS1, "saleType=2").replace(regS2, "saleType=4");//修改平台类型(原生分享出去统一改为分享平台)：1（直销通代客下单）改为 2（直销通分享页面购买） 3（微店原生购买）改为 4（微店分享购买）
        var imgpath = 'http://'+window.location.host+'/upload/file/default_head_img.png';
        var title = "宽带开户";
        var description = "宽带直接开户";
        var data = "url=" + urlpath + "&&img=" + imgpath + "&&title=" + title + "&&description=" + description + "";
        return data;
    }

    //客户端退出webview（返回首页）回调
    function backHandle(){
      if (getParamValue('isBdGroup')) {
        window.history.go(-1);
      } else {
        if (getParamValue("type") == "2") {
          if (/iphone|ipad|ipod/i.test(window.navigator.userAgent + window.navigator.platform) && window.webkit && window.webkit.messageHandlers) {
            window.webkit.messageHandlers.exitWeb.postMessage(null);
          } else {
            window.client.exitWeb();
          }
        }else{
          window.history.go(-1);
        }
      }
    }
  </script>
</body>
</html>